home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / bbs / revup10.zip / REVUP.BAT < prev    next >
DOS Batch File  |  1996-11-08  |  3KB  |  83 lines

  1. @echo off
  2. if "%3"=="fpick" goto fpick
  3. set fpick=%3
  4. goto havefile
  5. :fpick
  6. cd \max
  7. echo Other nodes Inactive >alfnode.flg
  8. for %%F in (ACTIVE*.BBS) do if not %%F==ACTIVE%5.BBS del alfnode.flg
  9. if not exist alfnode.flg echo.
  10. if not exist alfnode.flg echo Another node may be using the database.
  11. if not exist alfnode.flg echo FILES.* not hidden from File Selector.
  12. if exist alfnode.flg if exist %1\files.* attrib +h %1\files.*
  13. fpick /M%1\*.* /CB /Fname /Xjunktemp.bat /P"@set fpick=">junktemp.bat
  14. if exist alfnode.flg if exist %1\files.* attrib -h %1\files.*
  15. if exist alfnode.flg del alfnode.flg
  16. call junktemp.bat
  17. del  junktemp.bat
  18. if (%fpick%)==(:ESC) echo You did not pick a file.>\max\misc\revup.dat
  19. if (%fpick%)==(:ESC) goto end
  20. if (%fpick%)==(:0) echo Empty or invalid directory.>\max\misc\revup.dat
  21. if (%fpick%)==(:0) goto end
  22. :havefile
  23. cd \max\misc
  24. if %4==COM0 goto COM0
  25. echo.
  26. echo.>%4
  27. echo Searching upload log...
  28. echo Searching upload log... >%4
  29. copy revup.nlf revuptmp.bat>nul
  30. type %2|find /i "\%fpick% ">> revuptmp.bat
  31. if errorlevel 1 goto :notfound
  32. type revuptmp.bat| find /c /i "\%fpick% ">revup.cnt
  33. find "1" revup.cnt > nul
  34. if errorlevel 1 goto plusone
  35. goto found
  36. :plusone
  37. echo 
  38. echo >%4
  39. type revup.cnt
  40. type revup.cnt>%4
  41. echo ACentries found for `%fpick%'
  42. echo ACentries found for `%fpick%'>%4
  43. echo.
  44. echo.>%4
  45. echo Searching for most recent...
  46. echo Searching for most recent...>%4
  47. goto plus2
  48. :COM0
  49. echo.
  50. echo Searching upload log...
  51. copy revup.nlf revuptmp.bat>nul
  52. type %2|find /i "\%fpick% ">> revuptmp.bat
  53. if errorlevel 1 goto :notfound
  54. type revuptmp.bat| find /c /i "\%fpick% ">revup.cnt
  55. find "1" revup.cnt > nul
  56. if errorlevel 1 goto plus1
  57. goto found
  58. :plus1
  59. echo 
  60. type revup.cnt
  61. echo ACentries found for `%fpick%'
  62. echo.
  63. echo Searching for most recent...
  64. :plus2
  65. type revuptmp.bat| find /v /I "revuprun">btmp.tmp
  66. copy revup.nlf revuptmp.bat>nul
  67. type btmp.tmp>>revuptmp.bat
  68. type revuptmp.bat |find /c /i "\%fpick% ">revup2.cnt
  69. find "1" revup2.cnt > nul
  70. if errorlevel 1 goto plus2
  71. del btmp.tmp
  72. del revup2.cnt
  73. :found
  74. call revuptmp.bat
  75. goto :end
  76. :notfound
  77. echo %fpick% not found in upload log> revup.non
  78. echo   ƒ %fpick%          Å not found in upload log> revup.dat
  79. echo Å>> revup.dat
  80. echo P%fpick%> revup.fil
  81. :end
  82. set fpick=
  83.